package com.zhehekeji.opsys.api.entity;

// Generated 2016-11-3 10:47:48 by Hibernate Tools 3.4.0.CR1

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 * TSurveyQuestion generated by hbm2java
 */
@Entity
@Table(name="t_survey_question")
public class TSurveyQuestion implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8160291858894884006L;
	private Long id;
	private String title;
	private Integer type;
	private Integer choiceType;
	private Integer choiceRequire;
	private Double score;
	private String answer;
	private Integer sequence;
	private Date createTime;
	private Integer status;
	private TSurvey tsurvey;
	private Long cpCode;

	private Integer answerRequire;
	private String changeDate;
	private String picture;
	private String picturehd;
	
	private String answerOrderno;
	public TSurveyQuestion() {
	}

	public TSurveyQuestion(Long id) {
		this.id = id;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ID",length=20,nullable=false,unique=true)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	@Column(name="TITLE",length=255,nullable=true)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	@Column(name="TYPE",length=2,nullable=true)
	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
	@Column(name="CHOICE_TYPE",length=2,nullable=true)
	public Integer getChoiceType() {
		return choiceType;
	}

	public void setChoiceType(Integer choiceType) {
		this.choiceType = choiceType;
	}
	@Column(name="CHOICE_REQUIRE",length=2,nullable=true)
	public Integer getChoiceRequire() {
		return choiceRequire;
	}

	public void setChoiceRequire(Integer choiceRequire) {
		this.choiceRequire = choiceRequire;
	}
	@Column(name="SCORE",nullable=true)
	public Double getScore() {
		return score;
	}

	public void setScore(Double score) {
		this.score = score;
	}
	@Column(name="ANSWER",length=128,nullable=true)
	public String getAnswer() {
		return answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

	@Column(name="SEQUENCE",length=11,nullable=true)
	public Integer getSequence() {
		return this.sequence;
	}

	public void setSequence(Integer sequence) {
		this.sequence = sequence;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREATE_TIME",nullable=true)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Column(name="STATUS",length=2,nullable=true)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
	@ManyToOne(cascade=CascadeType.REFRESH,fetch=FetchType.EAGER,optional=true)
	@JoinColumn(name="SURVEY_ID")
	public TSurvey getTsurvey() {
		return tsurvey;
	}

	public void setTsurvey(TSurvey tsurvey) {
		this.tsurvey = tsurvey;
	}

	@Column(name="CP_CODE",length=20,nullable=true)
	public Long getCpCode() {
		return this.cpCode;
	}

	public void setCpCode(Long cpCode) {
		this.cpCode = cpCode;
	}

	@Column(name="ANSWER_REQUIRE",length=2,nullable=true)
	public Integer getAnswerRequire() {
		return answerRequire;
	}

	public void setAnswerRequire(Integer answerRequire) {
		this.answerRequire = answerRequire;
	}
	@Column(name="CHANGE_DATE",length=10,nullable=true)
	public String getChangeDate() {
		return changeDate;
	}

	public void setChangeDate(String changeDate) {
		this.changeDate = changeDate;
	}
	@Column(name="PICTURE",length=1024,nullable=true)
	public String getPicture() {
		return picture;
	}

	public void setPicture(String picture) {
		this.picture = picture;
	}

	@Transient
	public String getAnswerOrderno() {
		return answerOrderno;
	}

	public void setAnswerOrderno(String answerOrderno) {
		this.answerOrderno = answerOrderno;
	}
	@Column(name="PICTUREHD",length=1024,nullable=true)
	public String getPicturehd() {
		return picturehd;
	}

	public void setPicturehd(String picturehd) {
		this.picturehd = picturehd;
	}
}
